﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Lenovo.CFI.Common.Dic;
using Lenovo.CFI.DAL.Dic;

namespace Lenovo.CFI.BLL.DicBll
{
    public class IdeaTypeBl
    {
        public IdeaTypeBl()
        {
        }

        public List<IdeaType> GetAll()
        {
            return IdeaTypeDa.GetAll();
        }

        /// <summary>
        /// 查询DC所负责的Idea Type
        /// </summary>
        /// <param name="dc">DC ITCode</param>
        /// <returns></returns>
        public List<IdeaType> GetList(string dc)
        {
            return IdeaTypeDa.GetAll().FindAll(t => t.DC == dc);
        }

        public void Add(IdeaType entry)
        {
            IdeaTypeDa.Insert(entry);
        }
        public void Edit(IdeaType entry)
        {
            IdeaTypeDa.Update(entry);
        }
        public void Remove(IdeaType entry)
        {
            IdeaTypeDa.Delete(entry);
        }
    }
}
